package com.suteng.manager;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.zls.autoProfiles.AutoProfilesActivity;
import com.zls.reminder.ReminderActivity;
import com.zls.schedule.CalendarActivity;
import com.zls.timer.TimerActivity;

public class TimeActivity extends Activity {
	private Button time_profiles;
	private Button time_reminder;
	private Button time_schedule;
	private Button time_timer;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.time_manager);
		
		time_profiles = (Button) findViewById(R.id.time_profiles);
		time_profiles.setOnClickListener(listener);
		time_reminder = (Button) findViewById(R.id.time_reminder);
		time_reminder.setOnClickListener(listener);
		time_schedule = (Button) findViewById(R.id.time_schedule);
		time_schedule.setOnClickListener(listener);
		time_timer = (Button) findViewById(R.id.time_timer);
		time_timer.setOnClickListener(listener);
	}
	
private OnClickListener listener = new OnClickListener() {
		
		public void onClick(View v) {
			if(v.getId()==time_profiles.getId()){
				Intent intent_fond = new Intent(TimeActivity.this,AutoProfilesActivity.class);
				startActivity(intent_fond);
			}
			
			if(v.getId()==time_reminder.getId()){
				Intent intent_fond = new Intent(TimeActivity.this,ReminderActivity.class);
				startActivity(intent_fond);
			}
			if(v.getId()==time_schedule.getId()){
				Intent intent_fond = new Intent(TimeActivity.this,CalendarActivity.class);
				startActivity(intent_fond);
			}
			if(v.getId()==time_timer.getId()){
				Intent intent_fond = new Intent(TimeActivity.this,TimerActivity.class);
				startActivity(intent_fond);
			}
		}
	};
}
